<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@include file="../../../common/taglib.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@include file="../../../common/common-css.jsp" %>
<%@include file="../../../common/common-js.jsp" %>
        <link href="${pageContext.servletContext.contextPath }/css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css"
	href="${pageContext.servletContext.contextPath }/css/fenyecss.css" />
<script type="text/javascript">
function permissio(id){
	 var url = "${pageContext.servletContext.contextPath }/background/resources/permissioUser.html?id="+id;
	 var h_sp1 = 400;
	 var w_sp1 = 350;
	//兼容IE，firefox,google.模态窗口居中问题
	 var iTop2 = (window.screen.availHeight - 20 - h_sp1) / 2;
	 var iLeft2 = (window.screen.availWidth - 10 - w_sp1) / 2;
	 var params = 'menubar:no;dialogHeight=' + h_sp1 + 'px;dialogWidth=' + w_sp1 + 'px;dialogLeft=' + iLeft2 + 'px;dialogTop=' + iTop2 + 'px;resizable=yes;scrollbars=0;resizeable=0;center=yes;location:no;status:no;scroll:no'
	 window.showModalDialog(url, window, params);
	 //location.href=url;
}
function userRole(id){
	 var url = "${pageContext.servletContext.contextPath }/background/user/userRole.html?userId="+id;
	 var h_sp1 = 420;
	 var w_sp1 = 600;
	//兼容IE，firefox,google.模态窗口居中问题
	 var iTop2 = (window.screen.availHeight - 20 - h_sp1) / 2;
	 var iLeft2 = (window.screen.availWidth - 10 - w_sp1) / 2;
	 var params = 'menubar:no;dialogHeight=' + h_sp1 + 'px;dialogWidth=' + w_sp1 + 'px;dialogLeft=' + iLeft2 + 'px;dialogTop=' + iTop2 + 'px;resizable=yes;scrollbars=0;resizeable=0;center=yes;location:no;status:no;scroll:no'
	 window.showModalDialog(url, window, params);
	 //location.href=url;
}

function deleteId(id){
	if(confirm("确定要删除该条记录？")){
		window.location.href = "${pageContext.servletContext.contextPath }/background/serviceProvider/user/deleteById.html?id="+id;
	}
	
	
}
</script>
</head>
<body>
  <div style="height: 100%;overflow-y: auto;">
<form id="fenye" name="fenye" action="${pageContext.servletContext.contextPath }/background/serviceProvider/project/query.html" method="post">
				<div class="right" >
        	<div class="volume">
            	<img src="${pageContext.servletContext.contextPath }/images/toleft.png" style="margin:23px 0 0 2px;_margin:23px 0 0 0px;" />
            </div>
        	<div class="rightcon ">
            	<div class="title">
                	您当前的位置：首页 > 服务商管理 > 服务项目列表
                </div>
                <input type="hidden" name="pageNow" id="pageNow"/>
                <table border="0" cellpadding="0" cellspacing="0" class="table1">
                	<tr>
                    	<td class="odd">服务项目名称：
                        </td>
                        <td class="even"><input type="text" name="name" value="${param.name}" style="height: 20px"/>
                        </td>
                        <td class="odd"  rowspan="2"  >
                        	<div class="button" >
                        	<input type="image" src="${pageContext.servletContext.contextPath }/images/cx.png" width="101" height="46"/>
                        	</div>
                        </td>
                    </tr>
                </table>
					<div class="luke" style="float:right; margin-right:20px;"> <a href="javascript:history.go(-1)" ><img src="${pageContext.servletContext.contextPath }/images/fanhui.png" width="101" height="46"></a></div>
                 <table border="0" cellpadding="0" cellspacing="0" class="table2">
                 	<tr class="title">
                        <td width="20%" align="center">
                        	项目名
                        </td>
                         <td width="15%" align="center">
                        	单位
                        </td>
                        <td  width="15%" align="center">
                        	单价
                        </td>
                         <td  width="30%" align="center">
                        	描述
                        </td>
                        <td width="20%" style=" border-right:none;" align="center">
                        	操作
                        </td>
                    </tr>
                   <c:forEach var="key" items="${pageView.records}">
                    <tr class="odd">
                        <td align="center">
                        	${key.name}
                        </td>
                         <td align="center">
                        	${key.unit}
                        </td>
                        <td  align="center">
                        	${key.price}
                        </td>
                         <td align="center">
                        	${key.description}
                        </td>
                        <td  style=" border-right:none;" align="center">
                        	 <sec:authorize ifAnyGranted="ROLE_serviceprovider_project_edit">
			            <a href="${pageContext.servletContext.contextPath }/background/serviceProvider/project/getById.html?id=${key.id}&&typeKey=1">
			            	修改</a>
			           </sec:authorize>
			           <sec:authorize ifAnyGranted="ROLE_serviceprovider_project_delete">
			            <a href="javascript:void(0);" onclick="deleteId(${key.id});">
			           	            删除</a>
			            </sec:authorize>
                        </td>
                    </tr>
                    </c:forEach>
                    <tr>
                    <%@include file="../../../common/webfenye.jsp" %>
                    </tr>
                 </table>
                
            </div><!--rightcon-->
        </div>
</form>
</div>
</body>
</html>